Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CSI 14 t sequence support #810

Closed
wants to merge 1 commit into from
Closed

Add CSI 14 t sequence support #810

wants to merge 1 commit into from

Conversation

sxyazi
Copy link

@sxyazi sxyazi commented Aug 7, 2023

I noticed that #790 is merged, but some terminals (e.g. VSCode, Hyper canary which are node-pty based) do not implement the ioctl system call to get the terminal's width and height -- always zeros are returned, but they can get the correct pixel size by CSI 14 t.

I'm working on a terminal file manager where getting the correct width and height is critical for resizing images to be previewed, and I'll continue to add tests to the PR if it makes sense!

@sxyazi sxyazi requested a review from TimonPost as a code owner August 7, 2023 18:36
@TimonPost
Copy link
Member

Awesome!

@sxyazi
Copy link
Author

sxyazi commented Aug 9, 2023

Done!

@sxyazi
Copy link
Author

sxyazi commented Aug 11, 2023

I changed the timeout to be configurable so that it's more flexible, e.g. a session through ssh may need to wait for a bit large time.

@yazi-rs yazi-rs closed this by deleting the head repository Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants